<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>TodoMVC</title>
  <link rel="stylesheet" href="node_modules/todomvc-common/base.css">
  <link rel="stylesheet" href="node_modules/todomvc-app-css/index.css">
  <!-- CSS overrides - remove if you don't need it -->
  <link rel="stylesheet" href="css/app.css">
</head>

<body>
  <section id="app" class="todoapp">
    <header class="header">
      <h1>todos</h1>
      <input class="new-todo" @keydown.enter="handleDown" placeholder="What needs to be done?" v-focus>
    </header>
    <template v-if="todos.length">
      <section class="main">
        <input id="toggle-all" class="toggle-all" v-model="toggleAll" type="checkbox">
        <label for="toggle-all">Mark all as complete</label>
        <ul class="todo-list">
          <li :class="{completed:item.completed,editing:currentTodo==item}" v-for="item in filterTodos" :key="item.id">
            <div class="view">
              <input v-model="item.completed" class="toggle" type="checkbox">
              <label @dblclick="handleEdit(item)">{{item.title}}</label>
              <button class="destroy" @click="handleDel(item.id)"></button>
            </div>
            <input v-todo-focus="currentTodo===item" @keydown.enter="handleSaveEdit(item,$event)"
              @blur="handleSaveEdit(item,$event)" class="edit" :value="item.title" @keydown.esc="handleEsc">
          </li>
        </ul>
      </section>
      <footer class="footer"><span class="todo-count"><strong>{{index}}</strong> item left</span>
        <ul class="filters">
          <li><a href="#/" :class="{selected:filterText===''}">All</a></li>
          <li><a href="#/active" :class="{selected:filterText==='active'}">Active</a></li>
          <li><a href="#/completed" :class="{selected:filterText==='completed'}">Completed</a></li>
        </ul>
        <button v-if="todos.some(item=>item.completed)" @click="clearAll" class="clear-completed">Clear
          completed</button>
      </footer>
    </template>
  </section>
  <footer class="info">
    <p>Double-click to edit a todo</p>
    <!-- Remove the below line ↓ -->
    <p>Template by <a href="http://sindresorhus.com">Sindre Sorhus</a></p>
    <!-- Change this out with your name and url ↓ -->
    <p>Created by <a href="http://todomvc.com">you</a></p>
    <p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
  </footer>
  <script src="node_modules/vue/dist/vue.js"></script>
  <script src="node_modules/vue/dist/vue.min.js"></script>
  <script src="js/app.js"></script>
</body>

</html>